const koaRouter = require('koa-router')
const indexController = require('../controller/indexController')
const uploadController = require('../controller/uploadController')
const authMiddleware = require('../middleware/authMiddleware')
const router = new koaRouter({prefix:'/admin'})  // 接口地址默认后缀


// getInterface
			
			// home require Start
		const homeController = require('../controller/homeController')
		// home require end
			

			// user require Start
		const userController = require('../controller/userController')
		// user require end

// useNoAthInterface

			
			// OhbxGTqnM router Start
			router.get('/home',homeController.findOneHome)
			// OhbxGTqnM router end
			
			
			// AiV-mKZ4g router Start
			router.post('/user/login',userController.findOneUserLogin)
			// AiV-mKZ4g router end
			
			// _39SoIaMU router Start
			router.post('/user/register',userController.saveUser)
			// _39SoIaMU router end
			
			// X5WzuKKUL router Start
			router.get('/user/data',userController.findOneGetUserName)
			// X5WzuKKUL router end
			
			// YcMZL0cRT router Start
			router.get('/user/getimagecode',userController.findOneGetImageCode)
			// YcMZL0cRT router end

			
router.use(authMiddleware)  // 以下接口是需要登录校验判断才可访问的


router.post('/upload',uploadController.upload)

router.get('/',indexController.index)
// useInterface

			// O0WsdJpAE router Start
			router.get('/user/info',userController.findOneUserInfo)
			// O0WsdJpAE router end
			
			
			
			
			
			
			
			
			
			
			
			
			
			
			
			
			
			
			
			
			

			
			
			
			
			

			
			
			
			
			
	
			
			
			

module.exports = router